<script>
	import {
		mapState,
		mapActions,
		mapMutations
	} from "vuex"
	import $api from "@/api/index.js"
	import $store from "@/store/index.js"
	export default {
		data() {
			return {
				timer: null,
				travelTimer: null,
				lockTap: false
			}
		},
		async mounted() {},
		async onLaunch() {
			let arr = ['userInfo', 'autograph', 'location', 'locaRefuse', 'appLogin', 'loginType',
				'loginPage'
			]
			arr.map(key => {
				let val = uni.getStorageSync(key) || ''
				if (key == 'locaRefuse') {
					val = $store.state.user.location.lat ? (val || false) : false
				}
				this.updateUserItem({
					key,
					val
				})
				// #ifdef APP-PLUS
				if (key == 'userInfo') {
					this.updateUserItem({
						key: 'isShowLogin',
						val: val && val.id ? false : true
					})
				}
				// #endif
			})
		},
		async onShow() {},
		async onHide() {},
		onUnload() {},
		data() {
			return {
				resolvePrivacyAuthorization: ''
			}
		},
		watch: {},
		computed: mapState({
			configInfo: state => state.config.configInfo,
			old_attendant_name: state => state.config.old_attendant_name,
			old_channel_menu_name: state => state.config.old_channel_menu_name
		}),
		methods: {
			...mapMutations(['updateUserItem', 'updateOrderItem', 'updateConfigItem']),
		}
	}
</script>

<style lang="scss">
	@import "/styles/index.wxss";

	/* #ifdef H5 */
	uni-page-head {
		display: none;
	}

	/* #endif */
	.map-box .csssprite {
		border: 2px solid #fff !important;
		box-sizing: border-box;
		box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
		border-radius: 50% !important;
	}

	.map-box a div .csssprite {
		display: none;
	}

	page {
		font-size: 28rpx;
		color: #222;
		line-height: 1.5;
		background: #F6F6F6;
		font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
	}

	input {
		// font-family: PingFangSC-Medium, PingFang SC, -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
	}

	input::-webkit-input-placeholder {
		/* WebKit browsers */
		color: #A9A9A9;
	}

	input:-moz-placeholder {
		/* Mozilla Firefox 4 to 18 */
		color: #A9A9A9;
	}

	input::-moz-placeholder {
		/* Mozilla Firefox 19+ */
		color: #A9A9A9;
	}

	input:-ms-input-placeholder {
		/* Internet Explorer 10+ */
		color: #A9A9A9;
	}

	view {
		box-sizing: border-box;
	}

	image {
		display: block;
	}

	.h5-image {
		background-position: center center;
		background-size: cover;
		background-repeat: no-repeat;
	}

	/*隐藏滚动条*/
	::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
	}

	/* #ifdef MP-BAIDU */
	.swan-button.swan-button-radius-ios {
		border-radius: 0;
	}

	/* #endif */
</style>